package com.lhy.admin.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;


/**
 * <p>
 * 菜单/权限模型
 * </p>
 * @author 86159
 * @date 2021-05-22 16:50:22
 * Copyright (c) 2021 
 */
@Data
@TableName("t_permission")
@Schema(name="Permission", description="菜单/权限")

public class Permission implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 权限编码
     */
    @Schema(description= "权限编码")
    @TableField("code")
    private String code;

    /**
     * 权限名
     */
    @Schema(description= "权限名")
    @TableField("name")
    private String name;

    /**
     * 描述
     */
    @Schema(description= "描述")
    @TableField("description")
    private String description;

    /**
     * 图标
     */
    @Schema(description= "图标")
    @TableField("icon")
    private String icon;

    /**
     * 父权限ID
     */
    @Schema(description= "父权限ID")
    @TableField("parent")
    private Integer parent;

    /**
     * 祖先ID路径
     */
    @Schema(description= "祖先ID路径")
    @TableField("ancestors")
    private String ancestors;

    /**
     * 层级
     */
    @Schema(description= "层级")
    @TableField("level")
    private Integer level;

    /**
     * 0,页面权限，1接口权限
     */
    @Schema(description= "0,页面权限，1接口权限")
    @TableField("type")
    private Integer type;

    /**
     * 优先级
     */
    @Schema(description= "优先级")
    @TableField("priority")
    private Integer priority;


    public static final String ID = "id";
    public static final String CODE = "code";
    public static final String NAME = "name";
    public static final String DESCRIPTION = "description";
    public static final String ICON = "icon";
    public static final String PARENT = "parent";
    public static final String ANCESTORS = "ancestors";
    public static final String LEVEL = "level";
    public static final String TYPE = "type";
    public static final String PRIORITY = "priority";

}
